from twisted.internet import reactor, defer, protocol
from eDIP43A_AsyncDisplay import eDIP43A_AsyncDisplay

#---------------------------------------------------------------------------#
# Client Factories
#---------------------------------------------------------------------------#
class eDIP43A_Factory(protocol.ReconnectingClientFactory):
   ''' Simple client protocol factory '''

   protocol = eDIP43A_AsyncDisplay

   def __init__(self, framer, endpoint):
      ''' Remember things necessary for building a protocols '''
      self.framer = framer
      self.endpoint = endpoint
      self.volume = 0

   def buildProtocol(self, _):
      ''' Create a protocol and start the reading cycle '''
      proto = self.protocol(self)
      proto.factory = self
      return proto   
   
   